home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / nrpas13.zip / BESSK0.DEM < prev    next >
Text File  |  1991-04-29  |  574b  |  27 lines

  1. PROGRAM d6r22(input,output,dfile);
  2. (* driver for routine BESSK0 *)
  3. VAR
  4.    i,nval : integer;
  5.    val,x : real;
  6.    txt : string[27];
  7.    dfile : text;
  8.  
  9. (*$I MODFILE.PAS *)
  10. (*$I BESSI0.PAS *)
  11.  
  12. (*$I BESSK0.PAS *)
  13.  
  14. BEGIN
  15.    glopen(dfile,'fncval.dat');
  16.    REPEAT readln(dfile,txt) UNTIL (txt = 'Modified Bessel Function K0');
  17.    readln(dfile,nval);
  18.    writeln(txt);
  19.    writeln;
  20.    writeln('x':5,'actual':16,'bessk0(x)':17);
  21.    FOR i := 1 to nval DO BEGIN
  22.       readln(dfile,x,val);
  23.       writeln(x:6:2,val:16:7,bessk0(x):16:7)
  24.    END;
  25.    close(dfile)
  26. END.
  27.